package com.etone.smartAudit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etone.smartAudit.domain.ItemServerPath;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: sovy
 * @date: 2020/11/24
 * @description:
 */

@Mapper
public interface ItemServerPathMapper extends BaseMapper<ItemServerPath> {
    /**
     * 查看用户是有权限操作该文件
     *
     * @param adminId
     * @param itemId
     * @param serverId
     * @param path
     * @return
     */
    boolean hasAuth(@Param("adminId") Integer adminId, @Param("itemId") Integer itemId, @Param("serverId") Integer serverId, @Param("path") String path);

    /**
     * 查看项目和服务器路径是否有关联
     *
     * @param itemId
     * @param serverPathId
     * @return
     */
    boolean hasItemServerPath(@Param("itemId") Integer itemId, @Param("serverPathId") Integer serverPathId);

}